home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / FIX_DESK / SOURCE / FIX.H < prev    next >
Text File  |  1988-09-07  |  2KB  |  130 lines

  1.     /* Miscellaneous definitions */
  2.  
  3. /* #define TEST_MODE */
  4.  
  5. #define NIL 0L
  6. #define MINUS_ONE -1L
  7. #define HASH_SIZE 50
  8. #define    NAME_SIZE 32
  9. #define    LONG_NAME_SIZE 256
  10.  
  11.     /* Resource definitions */
  12.  
  13. enum {
  14.     APPLE_MENU = 1,
  15.     FILE_MENU,
  16.     EDIT_MENU
  17. };
  18.  
  19. enum {
  20.     APPLE_ABOUT = 1,
  21.     FILE_OPTIONS = 1,
  22.     FILE_PROCESS,
  23.     FILE_CLOSE,
  24.     FILE_QUIT
  25. };
  26.  
  27. #define STR_ID 200
  28.  
  29. enum {
  30.     /* String 1 is reserved... */
  31.     STR_NODESK = 2,
  32.     STR_FINDERID,
  33.     STR_BADFINDERID,
  34.     STR_READDESKTOP,
  35.     STR_READDISK,
  36.     STR_READFOLDER,
  37.     STR_UPDATEDESKTOP,
  38.     STR_COMMENT,
  39.     STR_COMMENTS,
  40.     STR_BUNDLE,
  41.     STR_BUNDLES,
  42.     STR_APPL,
  43.     STR_APPLS,
  44.     STR_DESKTOP
  45. };
  46.  
  47. #define MBAR_RESOURCE 200
  48.  
  49. enum {
  50.     DIALOG_ABOUT = 200,
  51.     DIALOG_VOLUME,
  52.     DIALOG_PROCESS,
  53.     DIALOG_OPTIONS,
  54.     DIALOG_STATS
  55. };
  56.  
  57. enum {
  58.     ALERT_ROM = 200,
  59.     ALERT_GENERAL,
  60.     ALERT_OPTIONS
  61. };
  62.  
  63.     /* Global variables. */
  64.  
  65. #ifdef FIX_MAIN
  66. int is_hfs, volume_refnum,
  67.     process_comments = 1, process_bundles = 1, process_appls = 0;
  68. int comment_count, bndl_count, appl_count;
  69. unsigned char string[LONG_NAME_SIZE];
  70. #else
  71. extern int is_hfs, volume_refnum,
  72.            process_comments, process_bundles, process_appls;
  73. extern int comment_count, bndl_count, appl_count;
  74. extern unsigned char string[LONG_NAME_SIZE];
  75. #endif
  76.  
  77.     /* Global prototypes. */
  78.  
  79.     /* applications.c */
  80.  
  81. void pre_appl_processing(void);
  82. void post_appl_processing(void);
  83. void add_application(long type, int dir_id, unsigned char *name);
  84.  
  85.     /* bundles.c */
  86.  
  87. void pre_bundle_processing(void);
  88. void post_bundle_processing(void);
  89. void remove_bndl(long type);
  90.  
  91.     /* comments.c */
  92.  
  93. void pre_comment_processing(void);
  94. void post_comment_processing(void);
  95. void remove_fcmt(int number);
  96. int comment_hash(unsigned char *name);
  97.  
  98.     /* hfs.c */
  99.  
  100. void hfs_scan_disk(void);
  101.  
  102.     /* mfs.c */
  103.  
  104. void mfs_scan_disk(void);
  105.  
  106.     /* options.c */
  107.  
  108. void do_options(void);
  109.  
  110.     /* process.c */
  111.  
  112. void one_pass(void);
  113. void set_processing(unsigned char *name);
  114.  
  115.     /* utility.c */
  116.  
  117. void set_watch_cursor(void);
  118. void set_normal_cursor(void);
  119. void kill_resource(long type, int id);
  120. #ifdef _DialogMgr_
  121. Handle get_item(DialogPtr the_dialog, int item);
  122. #endif
  123. void copystr(unsigned char *dest, unsigned char *source);
  124. void concatstr(unsigned char *first, unsigned char *second, unsigned char *dest);
  125. int equalstr(unsigned char *s1, unsigned char *s2);        /* 1  => equal */
  126.  
  127.     /* volume.c */
  128.  
  129. int select_volume_dialog(int *refnum, int *is_hfs);
  130.